From: Georges Basile Stavracas Neto Date: Thu, 24 Sep 2020 19:06:01 +0000 (-0300) Subject: appDisplay: Remove icon from folder when dragging out X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~655^2^2~3 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=aaff88a6bb06ebc6acf9b4ceaa456d679c71fdaa;p=gnome-shell.git appDisplay: Remove icon from folder when dragging out When dragging an icon outside of a folder dialog, there's a small delay before the dialog pops down. If the icon is dropped during this delay, the drag is cancelled, and the icon continues to be in the folder. However, this behavior turned out to be problematic, and it was a common point of failure that throwing icons outside folders wouldn't work. Remove the icon from the folder when dragging it to outside the dialog. Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3092 https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1447 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 43bab2db9..ce6754c56 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -2454,7 +2454,18 @@ var AppFolderDialog = GObject.registerClass({ this._setupDragMonitor(); } - return DND.DragMotionResult.NO_DROP; + return DND.DragMotionResult.MOVE_DROP; + } + + acceptDrop(source) { + const appId = source.id; + + this.popdown(() => { + this._view.removeApp(source); + this._appDisplay.selectApp(appId); + }); + + return true; } toggle() {